<template>
  <div class="salavar-view2">
    <!-- 内容区域 -->
    <h1>SalavarView2</h1>
    <form @submit.prevent="handleSubmit">
      <div>
        <label for="name">姓名：</label>
        <input id="name" v-model="name" type="text" />
      </div>
      <div>
        <label for="salary">薪水：</label>
        <input id="salary" v-model="salary" type="text" />
      </div>
      <button type="submit">提交</button>
    </form>
    <div v-if="submitted">
      <p>姓名：{{ name }}</p>
      <p>薪水：{{ salary }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
// 这里可以添加响应式数据和逻辑
import { useSalary } from '@/composables/SalaryView2';
const {name, salary, submitted, handleSubmit} = useSalary()

</script>



<style scoped>
.salavar-view2 {
  padding: 20px;
}
</style>
